﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ecommerceSample.Writer
{
    public partial class ArticleEdit : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //FormView1.Visible = false;
            }
        }

        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (DropDownList1.Items[0].Text == "(Select)")
            {
                DropDownList1.Items.RemoveAt(0);
            }
            //FormView1.Visible = true;
        }

        protected void FormView1_ItemDeleted(object sender, FormViewDeletedEventArgs e)
        {
            DropDownList1.Items.Clear();
            DropDownList1.DataBind();
        }

        protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
        {
            DropDownList1.Items.Clear();
            DropDownList1.DataBind();
        }

        protected void FormView1_ItemUpdated(object sender, FormViewUpdatedEventArgs e)
        {
            DropDownList1.Items.Clear();
            DropDownList1.DataBind();
        }
    }
}